﻿using System.Reflection;
using Autofac;

namespace Portal.Core.Bootstraper
{
	public class CoreRegistrationModule : Autofac.Module
	{
		protected override void Load(ContainerBuilder builder)
		{
			var assembly = Assembly.GetExecutingAssembly();

			builder.RegisterAssemblyTypes(assembly)
				.Where(t => t.Name.EndsWith("Adapter"))
				.AsImplementedInterfaces();
		}
	}
}